package com.nantian.logic.entity.mainEntity.stuEntity;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "student", schema = "springBoot")
public class StudentEntity {
    private long id;
    private Long userid;
    private String username;
    private String phone;
    private String sex;
    private Date entrance;
    private String majorsub;
    private Integer qq;
    private Integer universityid;
    private Integer areaid;
    private Integer campusid;
    private String department;
    private Integer positionid;
    private Integer special;
    private String authforview;

    @Id
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "userid")
    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "entrance")
    public Date getEntrance() {
        return entrance;
    }

    public void setEntrance(Date entrance) {
        this.entrance = entrance;
    }

    @Basic
    @Column(name = "majorsub")
    public String getMajorsub() {
        return majorsub;
    }

    public void setMajorsub(String majorsub) {
        this.majorsub = majorsub;
    }

    @Basic
    @Column(name = "qq")
    public Integer getQq() {
        return qq;
    }

    public void setQq(Integer qq) {
        this.qq = qq;
    }

    public Integer getUniversityid() {
        return universityid;
    }

    public void setUniversityid(Integer universityid) {
        this.universityid = universityid;
    }

    public Integer getAreaid() {
        return areaid;
    }

    public void setAreaid(Integer areaid) {
        this.areaid = areaid;
    }

    public Integer getCampusid() {
        return campusid;
    }

    public void setCampusid(Integer campusid) {
        this.campusid = campusid;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public Integer getPositionid() {
        return positionid;
    }

    public void setPositionid(Integer positionid) {
        this.positionid = positionid;
    }

    public Integer getSpecial() {
        return special;
    }

    public void setSpecial(Integer special) {
        this.special = special;
    }

    public String getAuthforview() {
        return authforview;
    }

    public void setAuthforview(String authforview) {
        this.authforview = authforview;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StudentEntity that = (StudentEntity) o;
        return id == that.id &&
                Objects.equals(userid, that.userid) &&
                Objects.equals(username, that.username) &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(sex, that.sex) &&
                Objects.equals(entrance, that.entrance) &&
                Objects.equals(majorsub, that.majorsub) &&
                Objects.equals(qq, that.qq)&&
                Objects.equals(universityid, that.universityid) &&
                Objects.equals(areaid, that.areaid) &&
                Objects.equals(campusid, that.campusid) &&
                Objects.equals(department, that.department) &&
                Objects.equals(positionid, that.positionid) &&
                Objects.equals(special, that.special)&&
                Objects.equals(authforview,that.authforview);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, userid, username, phone, sex, entrance, majorsub, qq,universityid,areaid,campusid,department,positionid,special,authforview);
    }
}
